<%@ include file="includeTop.jsp"%>
<html>
<head>
<title></title>
<%@ include file="includeTop_head.jsp"%>
</head>
<body>
<table height="100" width="100%" align="center"
	style="padding: 0; margin: 0" border=0>
	<tr>
		<td colspan="3"><%@ include file="user_status.jsp"%></td>
	</tr>

	<tr class="title">
		<td><%@ include file="title.jsp"%></td>
		<td align="center"><%@ include file="cartbar.jsp"%></td>
	</tr>
	<tr>
		<td colspan="3" height="70%">
		<table border=0 style="padding: 0; margin: 0">
			<tr>
				<td width="197" valign="top"><%@ include file="admin_left.jsp"%></td>
				<Td width="30"></Td>
				<td width="80%" valign="top">
				<table class="addresssub" id="cart" width="80%" height="300"
					cellspacing="0" cellpadding="0" border=0>
					<tr>
						<th height="20">Manage Product</Th>
					</tr>
					<tr>
						<Td height="15"><font color="red"><c:out value="${msg}" /></font></Td>
					</tr>
					<tr>
						<td valign="top">
						<table class="product" border="1">
							<tr>
								<th>Product ID</th>
								<th>Product Name</th>
								<th>Category ID</th>
								<th>Unit Price</th>
								<th>Available Quantity</th>
								<th>Description</th>
							</tr>
							<c:forEach var="product" items="${productList}" varStatus="loop">
								<tr>

									<td align="center"><c:out value="${product.productNo}" /></td>

									<td><a href="<%=contextPath%>/admin/editproduct.do?productId=<c:out value="${product.productId}"/>"><c:out
										value="${product.name}" /></a></td>

									<td><c:out value="${product.categoryId}" /></td>

									<td><c:out value="${product.unitPrice}" /></td>

									<td><c:out value="${product.curAmount}" /></td>

									<td align="center"><a href="<c:url value="/admin/editproduct.do?productId=${product.productId}"/>">Edit</a></td>

								</tr>
							</c:forEach>
						</table>
						</td>
					</tr>

					<tr>
						<td><a
							href="<%=contextPath%>/admin/newproduct.do?categoryId=<c:out value="${curCategoryId}"/>"><input
							type="button" value="Add Product" /></a></td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td colspan="3"><%@ include file="includeBottom.jsp"%></td>
			</tr>
		</table>
</body>
</html>